
const inventoryService = require("./inventory.service");

/**
 * 库存控制器
 * @create_by Haor
 * @create_at 2025/07/24 16:38:36
 */
class InventoryController {
    async createInventory(ctx) {
       ctx.body = await inventoryService.createInventory(ctx.request.body);
    }
    async deleteInventory(ctx) {
       ctx.body = await inventoryService.deleteInventory(ctx.request.params.id);
    }
    async updateInventory(ctx) {
        ctx.body = await inventoryService.updateInventory(ctx.request.params.id, ctx.request.body);
    }
    async queryInventoryList(ctx) {
       ctx.body = await inventoryService.queryInventoryList(ctx.request.query);
    }
    async getInventoryItem(ctx) {
       ctx.body = await inventoryService.getInventoryItem(ctx.request.params.id);
    }
}

module.exports = new InventoryController();

            